Skip to content

fix(llama-cpp): retain CPU variants in GPU builds - #11255

Merged
mudler merged 1 commit into
masterfrom
cron/issue-11254-cpu-offload
Aug 1, 2026
Merged

fix(llama-cpp): retain CPU variants in GPU builds#11255
mudler merged 1 commit into
masterfrom
cron/issue-11254-cpu-offload

Conversation

@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

Description

This PR fixes #11254.

GPU llama.cpp images on x86 now use the existing llama-cpp-cpu-all build target, preserving the selected CUDA/ROCm/Vulkan/SYCL backend while also packaging ggml's runtime-selected CPU kernels for partial offload. GPU arm64 builds remain on the portable fallback because their base images do not consistently provide the gcc-14 toolchain required by ggml's full armv9.2 variant matrix.

A focused shell regression test covers the architecture/build-type target selection.

Notes for Reviewers

Verification:

  • make test-build-scripts
  • make test-ci-scripts (41 tests)
  • bash -n .docker/llama-cpp-build-target.sh .docker/llama-cpp-compile.sh scripts/build/llama-cpp-build-target_test.sh backend/cpp/llama-cpp/run.sh
  • git diff --check

A full backend container build was not run locally because it is a long GPU/toolchain matrix build; CI is expected to exercise the affected llama.cpp image variants.

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

Build the runtime CPU variant set alongside x86 GPU backends so partial offload uses the host's SIMD kernels instead of the scalar fallback. Keep arm64 GPU images on the portable binary until their builders consistently provide gcc-14.

Assisted-by: Codex:gpt-5
@mudler
mudler merged commit cedcbf9 into master Aug 1, 2026
129 of 135 checks passed
@mudler
mudler deleted the cron/issue-11254-cpu-offload branch August 1, 2026 07:26
@localai-bot localai-bot added the bug Something isn't working label Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CPU offload performance regression?

3 participants